<template>
  <div class="root">
    <van-tabs
      v-model:active="active"
      color="#1583f1"
      title-active-color="#3296fa"
      ellipsis
      swipeable
      @click-tab="onClickTab"
    >
      <van-tab
        :title="'标签' + (index + 1)"
        v-for="(item, index) in 10"
        :key="index"
        >内容{{ index + 1 }}</van-tab
      >
    </van-tabs>
  </div>
</template>

<script>
import { ref } from "vue";
import { Toast } from "vant";
export default {
  setup(props) {
    const active = ref(0);
    const onClickTab = ({ title }) => {
      console.log(1);
    };
    return {
      active,
      onClickTab,
    };
  },
};
</script>

<style scoped lang="less">
.root {
  height: 1000px;
}
</style>